<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 21:18:52
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:18:52
-->
<!--
 * @Description: 
 * @Author: mxy
 * @Date: 2022-11-27 20:37:20
 * @LastEditors: mxy
 * @LastEditTime: 2022-11-27 21:18:08
-->
<template>
  <div>
    <h2>反转字符</h2>
    <p>{{ text }}</p>
    <button @click="reverse">按钮</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      text: "反转字符",
    };
  },
  methods: {
    reverse() {
      this.text = this.text.split("").reverse().join("");
    },
  },
};
</script>

<style>
h2 {
  color: red;
}
</style>
